<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      ul {
        display: flex;
        background-color: forestgreen;
        list-style: none;
        margin: 0;
        padding: 0;
        color: antiquewhite;
        /* 无效 */
        justify-content: center;
      }
      li {
        width: 100px;
        line-height: 100px;
        text-align: center;
        font-size: 18px;
        color: #fff;
      }
      .g-login {
        margin-left: auto;
      }
    </style>
  </head>
  <body>
    <div>
      <ul class="g-nav">
        <li>导航A</li>
        <li>导航B</li>
        <li>导航C</li>
        <li>导航D</li>
        <li class="g-login">登陆</li>
        <li>我的</li>
      </ul>
    </div>
  </body>
</html>
